<% 
    has_photo = @user.photo
    photo_url = has_photo ? url_for_file_column(@user, "photo") : "no_user_photo" 
%>
<% if has_photo -%>
<table onmouseover="show_delete(0)" onmouseout="hide_delete(0)" class="user_photo_container" >
<% else -%>
<table >
<% end -%>
<tr>
    <td class="user_photo">
        <%= image_tag(photo_url) %>
    </td>
    <% if has_photo -%>
    <td class="delete_box">               
        <%= link_to_remote(image_tag('delete.gif', :id => 'delete_0'), :update => 'user_photo_container',:after => "insertWaitingImg('user_photo_container')", :url => {:action => :delete_photo}, :confirm => 'Are you sure?' ) %>
    </td>
    <% end -%>
</tr>
</table>